package com.handyshop.mall.dubbo.order.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.handyshop.mall.dubbo.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;

@ApiModel(value = "交易单表")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "nrs_deal")
public class Deal extends BaseEntity {
    /**
     * 用户id
     */
    @TableField(value = "user_id")
    @ApiModelProperty(value = "用户id")
    private Long userId;

    /**
     * 订单数量
     */
    @TableField(value = "order_number")
    @ApiModelProperty(value = "订单数量")
    private Integer orderNumber;

    /**
     * 总价
     */
    @TableField(value = "total_price")
    @ApiModelProperty(value = "总价")
    private BigDecimal totalPrice;

    /**
     * 已支付金额
     */
    @TableField(value = "paid_price")
    @ApiModelProperty(value = "已支付金额")
    private BigDecimal paidPrice;

    /**
     * 状态(0: 未支付;1: 已支付; 2: 部分支付)
     */
    @TableField(value = "`status`")
    @ApiModelProperty(value = "状态(0: 未支付;1: 已支付; 2: 部分支付)")
    private Byte status;

    /**
     * 主单支付时间
     */
    @TableField(value = "pay_time")
    @ApiModelProperty(value = "主单支付时间")
    private Date payTime;

    /**
     * ip
     */
    @TableField(value = "ip")
    @ApiModelProperty(value = "ip")
    private String ip;

    /**
     * 订单渠道来源ID
     */
    @TableField(value = "channel_id")
    @ApiModelProperty(value = "订单渠道来源ID")
    private Long channelId;

    public static final String COL_ID = "id";

    public static final String COL_USER_ID = "user_id";

    public static final String COL_ORDER_NUMBER = "order_number";

    public static final String COL_TOTAL_PRICE = "total_price";

    public static final String COL_PAID_PRICE = "paid_price";

    public static final String COL_STATUS = "status";

    public static final String COL_PAY_TIME = "pay_time";

    public static final String COL_IP = "ip";

    public static final String COL_CHANNEL_ID = "channel_id";

    public static final String COL_DELETE_FLAG = "delete_flag";

    public static final String COL_CREATOR_ID = "creator_id";

    public static final String COL_CREATOR = "creator";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_MODIFY_TIME = "modify_time";
}